package com.hshoesmall.demo.controller;

import com.hshoesmall.demo.common.api.ApiResult;
import com.hshoesmall.demo.mapper.ShopCartMapper;
import com.hshoesmall.demo.model.entity.ShopCart;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/shopcart")
public class ShopCartController {

    @Resource
    ShopCartMapper shopCartMapper;

    @GetMapping
    public ApiResult <List<ShopCart>> getShopCart(){
        List<ShopCart> shopCartList=shopCartMapper.GoShopCart();
        return ApiResult.success(shopCartList);
    }
}
